<template>
    <div>
        <van-pull-refresh
  v-model="isLoading"
  success-text="刷新成功"
  @refresh="onRefresh"
>
  <p>刷新次数: {{ count }}</p>
</van-pull-refresh>
    </div>
</template>

<script>
import { PullRefresh } from 'vant';
export default {
    name: 'TestVue',
    data() {
        return {
            count: 0,
            isLoading: false
        }
    },
    components: {},
    computed: {},
    methods: {
        onRefresh() {
            setTimeout(() => {
                this.$toast('刷新成功');
                this.isLoading = false;
                this.count++;
            }, 500);
        }
    }
}
</script>

<style scoped lang='scss'>
</style>
